package com.ruoyi.shop.common.core.domain;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品分类对象 shop_category
 *
 * @author xuxiang
 * @date 2021-11-15
 */
public class ShopCategory extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 商品分类id
     */
    private Long categoryId;

    /**
     * 父分类id
     */
    private Long parentId;

    /**
     * 祖级列表
     */
    @Excel(name = "祖级列表")
    private String ancestors;

    /**
     * 商品分类名称
     */
    @Excel(name = "商品分类名称")
    private String categoryName;

    /**
     * 分类类型（1=商品类型2素材类型3商品规格）
     */
    @Excel(name = "分类类型")
    private Integer categoryType;

    /**
     * 祖级列表
     */
    @Excel(name = "分类等级")
    private Integer level;

    /**
     * 分类排序
     */
    @Excel(name = "分类排序")
    private Long sort;

    /**
     * 分类图标
     */
    @Excel(name = "分类图标")
    private String logo;

    /**
     * 分类状态（0正常 1停用）
     */
    @Excel(name = "分类状态")
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    /**
     * 父部门名称
     */
    private String parentName;

    /**
     * 排除编号
     */
    @JsonIgnore
    private Long excludeId;

    /**
     * 子类列表
     */
    private List<ShopCategory> children = new ArrayList<ShopCategory>();

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    public Long getSort() {
        return sort;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public String getAncestors() {
        return ancestors;
    }

    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public Long getExcludeId() {
        return excludeId;
    }

    public void setExcludeId(Long excludeId) {
        this.excludeId = excludeId;
    }

    public List<ShopCategory> getChildren() {
        return children;
    }

    public void setChildren(List<ShopCategory> children) {
        this.children = children;
    }

    public Integer getCategoryType() {
        return categoryType;
    }

    public void setCategoryType(Integer categoryType) {
        this.categoryType = categoryType;
    }


    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("categoryId", getCategoryId())
                .append("categoryName", getCategoryName())
                .append("parentId", getParentId())
                .append("parentName", getParentName())
                .append("ancestors", getAncestors())
                .append("level", getLevel())
                .append("excludeId", getExcludeId())
                .append("sort", getSort())
                .append("logo", getLogo())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
